<template>
  <div class="section-body">
    <div class="coupon-box" v-if="styleType == 1">
      <div class="sort-section">
        <div
          class="coupon-content"
          :style="{
            backgroundImage: `url(${propsData.params.couponPic})`,
          }"
          v-for="(item, index) in 2"
          :key="index"
        >
          <div class="info-box">
            <div
              class="price"
              :style="{ color: propsData.params.colorConfig.priceColor }"
            >
              <span>¥</span>
              <span>&nbsp;99</span>
            </div>
            <div
              class="info"
              :style="{ color: propsData.params.colorConfig.infoColor }"
            >
              2021.8.9到期
            </div>
          </div>
          <div class="receive">
            <span :style="{ color: propsData.params.colorConfig.btnColor }"
              >立即领取</span
            >
          </div>
        </div>
      </div>
    </div>
    <div class="node-two" v-if="styleType == 2">
      <div class="node-item" v-for="(item, index) in 2" :key="index">
        <div
          class="node-bg"
          :style="{ background: propsData.params.colorConfig.bgColor }"
        >
          <!-- <div class="top-circle"></div>
          <div class="down-circle"></div> -->
          <div
            class="dashed-line"
            :style="{ borderColor: propsData.params.colorConfig.breakLine }"
          ></div>
        </div>
        <div class="node-content">
          <div class="info-box">
            <div
              class="price"
              :style="{ color: propsData.params.colorConfig.priceColor }"
            >
              <span>¥</span>
              <span>&nbsp;99</span>
            </div>
            <div
              class="info"
              :style="{ color: propsData.params.colorConfig.infoColor }"
            >
              2021.8.9到期
            </div>
          </div>
          <div class="receive">
            <span :style="{ color: propsData.params.colorConfig.btnColor }"
              >立即领取</span
            >
          </div>
        </div>
      </div>
    </div>
    <div class="node-three" v-if="styleType == 3">
      <div class="node-item" v-for="(item, index) in 2" :key="index">
        <div
          class="node-bg"
          :style="{ background: propsData.params.colorConfig.bgColor }"
        ></div>
        <div class="node-content">
          <div class="top-circle"></div>
          <div
            class="down-circle"
            :style="{ background: propsData.params.colorConfig.bgColor }"
          ></div>
          <div class="info-box">
            <div
              class="price"
              :style="{ color: propsData.params.colorConfig.priceColor }"
            >
              <span>¥</span>
              <span>&nbsp;99</span>
            </div>
            <div
              class="info"
              :style="{ color: propsData.params.colorConfig.infoColor }"
            >
              2021.8.9到期
            </div>
          </div>
          <div class="solid-line"></div>
          <div class="receive">
            <span :style="{ color: propsData.params.colorConfig.btnColor }"
              >立即领取</span
            >
            <i class="iconfont icon-weibiaoti-13"></i>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  props: {
    propsData: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {};
  },
  mounted() {},
  watch: {},
  computed: {
    styleType() {
      return this.propsData.params.styleType || "1";
    },
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.section-body {
  .coupon-box {
    width: 100%;
    height: 92px;
    position: relative;
    margin: 0 auto;
    .sort-section {
      width: 100%;
      height: 100%;
      position: absolute;
      left: 0;
      top: 0;
      z-index: 11;
      display: flex;
      align-items: center;
      .coupon-content {
        width: 100%;
        height: 92px;
        border-radius: 10px;
        margin-right: 11px;
        display: flex;
        align-items: center;
        padding: 0 23px 0 18px;
        background-size: 100% 100%;
        background-repeat: no-repeat;
        .info-box {
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          margin-right: 10px;
          flex: 1;
          .price {
            font-size: 30px;
            font-weight: bold;
            color: #ffffff;
            display: flex;
            align-items: baseline;
            line-height: 1;
            margin-bottom: 5px;
            span:first-child {
              font-size: 16px;
            }
          }
          .info {
            font-size: 12px;
            line-height: 20px;
            color: #ffffff;
            margin-bottom: 0;
          }
        }
        .receive {
          width: 39px;
          height: 40px;
          background: linear-gradient(180deg, #ffeecf 0%, #fed59b 100%);
          box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
          border-radius: 50%;
          display: flex;
          justify-content: center;
          align-items: center;
          span {
            width: 24px;
            font-size: 12px;
            line-height: 14px;
            color: #ec2827;
          }
        }
      }
      .coupon-content:last-child {
        margin-right: 0;
      }
    }
  }
  .node-two {
    width: 100%;
    height: 92px;
    display: flex;
    align-items: center;
    .node-item {
      width: 100%;
      height: 92px;
      margin-right: 11px;
      position: relative;
      .node-bg {
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, #ffb85c 0%, #ff7734 100%);
        position: relative;
        border-radius: 10px;
        .top-circle,
        .down-circle {
          width: 12px;
          height: 12px;
          background: #ffffff;
          border-radius: 50%;
          position: absolute;
          left: 109px;
          top: -6px;
        }
        .down-circle {
          top: inherit;
          bottom: -6px;
        }
        .dashed-line {
          height: 75px;
          border: 1px dashed #e87531;
          position: absolute;
          left: 114px;
          top: 9px;
        }
      }
      .node-content {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px 0 18px;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 11;
        .info-box {
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          .price {
            font-size: 30px;
            font-weight: bold;
            color: #ffffff;
            display: flex;
            align-items: baseline;
            line-height: 1;
            margin-bottom: 5px;
            span:first-child {
              font-size: 16px;
            }
          }
          .info {
            font-size: 12px;
            line-height: 20px;
            color: #ffffff;
            margin-bottom: 0;
          }
        }
        .receive {
          width: 16px;
          height: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
          span {
            width: 16px;
            font-size: 14px;
            color: #ffffff;
            line-height: 14px;
          }
        }
      }
    }
    .node-item:last-child{
      margin-right: 0;
    }
  }
  .node-three {
    width: 100%;
    height: 92px;
    display: flex;
    align-items: center;
    .node-item {
      width: 100%;
      height: 93px;
      margin-right: 11px;
      position: relative;
      padding-top: 8px;
      .node-bg {
        width: 95.8%;
        height: 85px;
        background: #ffa473;
        margin-left: 8px;
      }
      .node-content {
        width: 95.8%;
        height: 85px;
        background: #ffffff;
        border: 1px solid #666666;
        position: absolute;
        left: 0;
        top: 0;
        z-index: 11;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .info-box {
          width: 97px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          .price {
            font-size: 30px;
            font-weight: bold;
            color: #ffcb3f;
            display: flex;
            align-items: baseline;
            line-height: 1;
            margin-bottom: 5px;
            span:first-child {
              font-size: 16px;
            }
          }
          .info {
            font-size: 12px;
            line-height: 20px;
            color: #484a51;
            margin-bottom: 0;
          }
        }
        .solid-line {
          width: 1px;
          height: 47px;
          background-color: #cccccc;
          position: absolute;
          left: 61%;
          top: 20px;
        }
        .receive {
          flex: 1;
          display: flex;
          align-items: center;
          padding-left: 12px;
          span {
            width: 24px;
            font-size: 12px;
            font-family: PingFang SC;
            color: #404040;
            margin-right: 7px;
            flex-shrink: 0;
          }
          .iconfont {
            font-size: 10px;
          }
        }
        .top-circle {
          width: 12px;
          height: 12px;
          background: #ffffff;
          border-bottom: 1px solid #666666;
          border-radius: 50%;
          position: absolute;
          left: 90px;
          top: -6px;
          display: none;
        }
        .down-circle {
          width: 12px;
          height: 12px;
          background: #ffa473;
          border-radius: 50%;
          position: absolute;
          left: 90px;
          bottom: -6px;
          border-top: 1px solid #ffa473;
          display: none;
        }
      }
    }
    .node-item:last-child{
      margin-right: 0;
    }
  }
}
// background: linear-gradient(
// 0.25turn,#ffb452,#ff863c),radial-gradient(circle at 8px 0,transparent 6px,#ff863c 6.5px),radial-gradient(circle at 9px 43px,transparent 8px,#ff863c 6.5px) bottom left,linear-gradient(
// .25turn,#ff863c,#FF7734);
//     background-size: 66% 92px,10% 52px,11% 40px,25% 92px!important;
//     background-repeat: no-repeat!important;
//     background-position: 0px 0px,73% 0px,73% 52px,100% 0!important;
</style>
